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
device
GraphicsDeviceThe device.
sizeX
floatThe size X.
sizeY
floatThe size Y.
tessellationX
intThe tessellation, as the number of quads per X axis.
tessellationY
intThe tessellation, as the number of quads per Y axis.
uFactor
floatScale U coordinates between 0 and the values of this parameter.
vFactor
floatScale V coordinates 0 and the values of this parameter.
generateBackFace
boolAdd a back face to the plane
toLeftHanded
boolif set to
true
vertices and indices will be transformed to left handed. Default is false.normalDirection
NormalDirectionThe 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
sizeX
floatThe size X.
sizeY
floatThe size Y.
tessellationX
intThe tessellation, as the number of quads per X axis.
tessellationY
intThe tessellation, as the number of quads per Y axis.
uFactor
floatScale U coordinates between 0 and the values of this parameter.
vFactor
floatScale V coordinates 0 and the values of this parameter.
generateBackFace
boolAdd a back face to the plane
toLeftHanded
boolif set to
true
vertices and indices will be transformed to left handed. Default is false.normalDirection
NormalDirectionThe direction of the plane normal
Returns
- GeometricMeshData<VertexPositionNormalTexture>
A Plane primitive.
Exceptions
- ArgumentOutOfRangeException
tessellation;tessellation must be > 0