Verlet Intergration Soft Body
Loading...
Searching...
No Matches
VectorGraphics.PrimitiveBatch Class Reference

The PrimitiveBatch class is responsible for drawing basic shapes such as lines, circles, rectangles, and triangles using a SpriteBatch. It creates textures for a white pixel and a filled circle, which are used to draw the shapes. T. More...

Classes

class  Shape
 the base class for all shapes that can be drawn using the PrimitiveBatch. Each shape has a position, color and a filled property to determine if the shape should be filled or just an outline. More...
class  Line
 Represents a line shape defined by a start position, an end position, a color, and a width. The line can be drawn using the Draw method, which calculates the angle and length of the line to properly render it using the white pixel texture. The ConstrainToSide method is used to constrain a point to one side of the line, which can be useful for collision detection or ensuring that particles do not cross the line. More...
class  Circle
 Represents a circle shape defined by a center position, a radius, a color, and a filled property. More...
class  Rectangle
class  RoundedRectangle
class  RectangleTexture
class  Pixel
class  Triangle
class  Arrow

Public Member Functions

 PrimitiveBatch (GraphicsDevice graphicsDevice, float circleRadius=75f)
void CreateTextures (float circleRadius=75f)
 Creates the necessary textures for drawing primitives.

Public Attributes

Texture2D whitePixel
 A 1x1 white pixel texture used for drawing lines and rectangles. This texture is stretched and rotated to create the desired shapes.
Texture2D circleTextureFilled
 A texture used for drawing filled circles. It is generated using the CreateCircleTexture method and is scaled to the desired radius when drawn. This allows for efficient rendering of circles without needing to calculate individual points for each circle every frame.
GraphicsDevice graphicsDevice

Detailed Description

The PrimitiveBatch class is responsible for drawing basic shapes such as lines, circles, rectangles, and triangles using a SpriteBatch. It creates textures for a white pixel and a filled circle, which are used to draw the shapes. T.

Member Function Documentation

◆ CreateTextures()

void VectorGraphics.PrimitiveBatch.CreateTextures ( float circleRadius = 75f)
inline

Creates the necessary textures for drawing primitives.

Parameters
circleRadius

The documentation for this class was generated from the following file:
  • PhysicsCSAlevlProject/libs/MonoGame2DVectorGraphics/Vector.cs