|
MeshUtilsGeneratePlanarTextureCoordinates(MeshGeometry3D, Vector3D, Vector3D, Rect, Boolean, Boolean, Boolean) Method |
Returns a TextureCoordinates for the specified mesh.
TextureCoordinates are calculated with using the Planar projection.
The plane is defined by the planeNormalVector (perpendicular to the plane) and planeHeightVector (defines the y up direction in the plane).
Namespace: Ab3d.UtilitiesAssembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax public static PointCollection GeneratePlanarTextureCoordinates(
MeshGeometry3D mesh,
Vector3D planeNormalVector,
Vector3D planeHeightVector,
Rect customBounds,
bool flipXCoordinate = false,
bool flipYCoordinate = false,
bool flipBackwardFacingXCoordinate = false
)
Parameters
- mesh MeshGeometry3D
- MeshGeometry3D
- planeNormalVector Vector3D
- Vector3D that defines the plane normal - vector perpendicular to the plane
- planeHeightVector Vector3D
- Vector3D that defines the direction of the 2D height vector on the plane
- customBounds Rect
- When not Empty it specifies 2D bounding box of the 3D positions projected to the 2D plane that is used to limit the TextureCoordinates.
- flipXCoordinate Boolean (Optional)
- if true then the x texture coordinate is flipped
- flipYCoordinate Boolean (Optional)
- if true then the y texture coordinate is flipped
- flipBackwardFacingXCoordinate Boolean (Optional)
- if true the x texture coordinate on the positions with backward facing normals are flipped - this allows creating texture coordinates for displaying text that can be read on both sides of the object.
Return Value
PointCollectionPointCollection with calculated TextureCoordinates
See Also