ClippedPolyList
Engine/source/collision/clippedPolyList.h
The clipped polylist class takes the geometry passed to it and clips it against the PlaneList set.
Classes:
Public Types
Public Static Attributes
bool
???
Public Attributes
The per-vertex normals.
If the dot product result between a poly's normal and mNormal is greater than this value it will be rejected.
The list of planes to clip against.
Public Functions
addPointAndNormal(const Point3F & p, const Point3F & normal)
Adds a point and normal to the poly list, and returns an ID number for them.
begin(BaseMatInstance * material, U32 surfaceKey)
Start a surface.
Often after clipping you'll end up with orphan verticies that are unused by the poly list.
Generates averaged normals from the poly normals.
bool
isEmpty()
Are we empty of data?
This breaks all polys in the polylist into triangles.
Protected Functions
Detailed Description
The clipped polylist class takes the geometry passed to it and clips it against the PlaneList set.
It also contains helper functions for
Public Types
typedef FastVector< U32 > IndexList
typedef IndexList::iterator IndexListIterator
typedef Vector< PlaneF > PlaneList
typedef PlaneList::iterator PlaneListIterator
typedef Vector< Poly > PolyList
typedef PolyList::iterator PolyListIterator
typedef Vector< Vertex > VertexList
typedef VertexList::iterator VertexListIterator
Public Static Attributes
bool allowClipping
???
const U32 IndexListReserveSize
Public Attributes
IndexList mIndexList
VectorF mNormal
If non-zero any poly facing away from this normal is removed from the list.
This should be set before filling the polylist.
Vector< VectorF > mNormalList
The per-vertex normals.
F32 mNormalTolCosineRadians
If the dot product result between a poly's normal and mNormal is greater than this value it will be rejected.
The default value is 0.
90 degrees = mCos( mDegToRad( 90.0f ) = 0
PlaneList mPlaneList
The list of planes to clip against.
This should be set before filling the polylist.
PolyList mPolyList
PlaneList mPolyPlaneList
IndexList mTempIndexList
PolyList mTempPolyList
VertexList mVertexList
Private Functions
memcpy(U32 * d, U32 * s, U32 size)
Public Functions
ClippedPolyList()
~ClippedPolyList()
addPlane(const PlaneF & plane)
Reimplemented from: AbstractPolyList
addPoint(const Point3F & p)
Reimplemented from: AbstractPolyList
addPointAndNormal(const Point3F & p, const Point3F & normal)
Reimplemented from: AbstractPolyList
begin(BaseMatInstance * material, U32 surfaceKey)
Reimplemented from: AbstractPolyList
clear()
cullUnusedVerts()
Often after clipping you'll end up with orphan verticies that are unused by the poly list.
This removes these unused verts and updates the index list.
end()
Reimplemented from: AbstractPolyList
Reimplemented by: DepthSortList
generateNormals()
Generates averaged normals from the poly normals.
isEmpty()
Reimplemented from: AbstractPolyList
plane(const PlaneF & p)
Reimplemented from: AbstractPolyList
plane(const U32 index)
Reimplemented from: AbstractPolyList
plane(U32 v1, U32 v2, U32 v3)
Reimplemented from: AbstractPolyList
triangulate()
This breaks all polys in the polylist into triangles.
vertex(U32 vi)
Reimplemented from: AbstractPolyList