17 template <
typename Real>
27 inline std::shared_ptr<ParametricSurface<3, Real>>
const&
GetSurface()
const;
38 std::shared_ptr<ParametricSurface<3, Real>>
mSurface;
46 template <
typename Real>
62 LogError(
"A nonnull rectangular surface is required.");
102 template <
typename Real>
103 inline std::shared_ptr<ParametricSurface<3, Real>>
const&
109 template <
typename Real>
119 tcoord[1] = vMin + vDelta * (Real)
r;
122 tcoord[0] = uMin + uDelta * (Real)
c;
128 template <
typename Real>
141 template <
typename Real>
150 mSurface->Evaluate(tcoord[0], tcoord[1], 1, values);
158 template <
typename Real>
168 mSurface->Evaluate(tcoord[0], tcoord[1], 1, values);
174 this->
DPDU(i) = values[1];
178 this->
DPDV(i) = values[2];
185 this->
Normal(i) = values[3];
199 template <
typename Real>
208 template <
typename Real>
217 template <
typename Real>
MeshDescription mDescription
Vector3< Real > * mBitangents
std::shared_ptr< ParametricSurface< 3, Real > > const & GetSurface() const
Vector< N, Real > UnitCross(Vector< N, Real > const &v0, Vector< N, Real > const &v1, bool robust=false)
Vector3< Real > & Bitangent(uint32_t i)
Vector3< Real > & DPDU(uint32_t i)
GLenum GLsizei GLsizei GLint * values
RectanglePatchMesh(MeshDescription const &description, std::shared_ptr< ParametricSurface< 3, Real >> const &surface)
Vector3< Real > * mTangents
void InitializePositions()
virtual void UpdateFrame() override
bool wantDynamicTangentSpaceUpdate
#define LogError(message)
Vector3< Real > * mNormals
Real Normalize(GVector< Real > &v, bool robust=false)
std::vector< Vector2< Real > > mDefaultTCoords
virtual void UpdatePositions() override
virtual void UpdateNormals() override
Vector2< Real > & TCoord(uint32_t i)
Vector3< Real > & Tangent(uint32_t i)
Vector2< Real > * mTCoords
Vector3< Real > & Normal(uint32_t i)
std::shared_ptr< ParametricSurface< 3, Real > > mSurface
Vector3< Real > & DPDV(uint32_t i)
bool hasTangentSpaceVectors
Real ComputeOrthogonalComplement(int numInputs, Vector2< Real > *v, bool robust=false)
Vector3< Real > & Position(uint32_t i)