Class GeometricPrimitive.Plane
- Namespace
- Stride.Graphics.GeometricPrimitives
- Assembly
- Stride.Graphics.dll
A plane primitive.
public static class GeometricPrimitive.Plane
- Inheritance
-
GeometricPrimitive.Plane
Methods
New(GraphicsDevice, float, float, int, int, float, float, bool, bool, NormalDirection)
Creates a Plane primitive on the X/Y plane with a normal equal to -UnitZ.
public static GeometricPrimitive New(GraphicsDevice device, float sizeX = 1, float sizeY = 1, int tessellationX = 1, int tessellationY = 1, float uFactor = 1, float vFactor = 1, bool generateBackFace = false, bool toLeftHanded = false, NormalDirection normalDirection = NormalDirection.UpZ)
Parameters
deviceGraphicsDeviceThe device.
sizeXfloatThe size X.
sizeYfloatThe size Y.
tessellationXintThe tessellation, as the number of quads per X axis.
tessellationYintThe tessellation, as the number of quads per Y axis.
uFactorfloatScale U coordinates between 0 and the values of this parameter.
vFactorfloatScale V coordinates 0 and the values of this parameter.
generateBackFaceboolAdd a back face to the plane
toLeftHandedboolif set to
truevertices and indices will be transformed to left handed. Default is false.normalDirectionNormalDirectionThe direction of the plane normal
Returns
- GeometricPrimitive
A Plane primitive.
Exceptions
- ArgumentOutOfRangeException
tessellation;tessellation must be > 0
New(float, float, int, int, float, float, bool, bool, NormalDirection)
Creates a Plane primitive on the X/Y plane with a normal equal to -UnitZ.
public static GeometricMeshData<VertexPositionNormalTexture> New(float sizeX = 1, float sizeY = 1, int tessellationX = 1, int tessellationY = 1, float uFactor = 1, float vFactor = 1, bool generateBackFace = false, bool toLeftHanded = false, NormalDirection normalDirection = NormalDirection.UpZ)
Parameters
sizeXfloatThe size X.
sizeYfloatThe size Y.
tessellationXintThe tessellation, as the number of quads per X axis.
tessellationYintThe tessellation, as the number of quads per Y axis.
uFactorfloatScale U coordinates between 0 and the values of this parameter.
vFactorfloatScale V coordinates 0 and the values of this parameter.
generateBackFaceboolAdd a back face to the plane
toLeftHandedboolif set to
truevertices and indices will be transformed to left handed. Default is false.normalDirectionNormalDirectionThe direction of the plane normal
Returns
- GeometricMeshData<VertexPositionNormalTexture>
A Plane primitive.
Exceptions
- ArgumentOutOfRangeException
tessellation;tessellation must be > 0