Go to the documentation of this file.
28 #ifndef __PatchSurface_H__
29 #define __PatchSurface_H__
106 void defineSurface(
void* controlPointBuffer,
108 PatchSurfaceType pType = PST_BEZIER,
109 size_t uMaxSubdivisionLevel = AUTO_LEVEL,
size_t vMaxSubdivisionLevel = AUTO_LEVEL,
110 VisibleSide visibleSide = VS_FRONT);
117 size_t getRequiredVertexCount(
void)
const;
123 size_t getRequiredIndexCount(
void)
const;
126 size_t getCurrentIndexCount(
void)
const;
137 Real getBoundingSphereRadius(
void)
const;
164 void setSubdivisionFactor(
Real factor);
167 Real getSubdivisionFactor(
void)
const;
171 return mControlPointBuffer;
176 mControlPointBuffer = 0;
213 void distributeControlPoints(
void* lockedBuffer);
214 void subdivideCurve(
void* lockedBuffer,
size_t startIdx,
size_t stepSize,
size_t numSteps,
size_t iterations);
215 void interpolateVertexData(
void* lockedBuffer,
size_t leftIndex,
size_t rightIndex,
size_t destIndex);
216 void makeTriangles(
void);
218 size_t getAutoULevel(
bool forMax =
false);
219 size_t getAutoVLevel(
bool forMax =
false);
size_t mCtlHeight
Height in control points.
vector< Vector3 >::type mVecCtlPoints
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
HardwareVertexBufferSharedPtr mVertexBuffer
void * getControlPointBuffer(void) const
VisibleSide mVSide
Which side is visible.
Shared pointer implementation used to share index buffers.
size_t mULevel
U-direction subdivision level.
A surface which is defined by curves of some kind to form a patch, e.g.
The side from which u goes right and v goes up (as in texture coords)
size_t mCtlCount
TotalNumber of control points.
size_t mVLevel
V-direction subdivision level.
VertexDeclaration * mDeclaration
Vertex declaration describing the control point buffer.
size_t mMeshWidth
Width of the subdivided mesh (big enough for max level)
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
Shared pointer implementation used to share vertex buffers.
size_t getVertexOffset(void) const
Returns the vertex offset used by this buffer to write data into the buffer.
A 3D box aligned with the x/y/z axes.
size_t getIndexOffset(void) const
Returns the index offset used by this buffer to write data into the buffer.
size_t mMaxULevel
Max subdivision level.
HardwareIndexBufferSharedPtr mIndexBuffer
size_t mRequiredIndexCount
size_t mCtlWidth
Width in control points.
void * mControlPointBuffer
Buffer containing the system-memory control points.
float Real
Software floating point type.
The side from which u goes right and v goes down (reverse of texture coords)
Standard 3-dimensional vector.
PatchSurfaceType mType
Type of surface.
size_t mRequiredVertexCount
size_t mMeshHeight
Height of the subdivided mesh (big enough for max level)
void notifyControlPointBufferDeallocated(void)
Convenience method for telling the patch that the control points have been deleted,...
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.