delete plane; plane = thePlane,-
}
void setColor ( const Vector4D& theColor ) {
color = theColor;
}
int getNumVertices () const return numVertices;
const Vector3D * getvertices () const return vertices;
const Vector2D * getUVMap () const return uvMap;
const Vector4D * getColors () const return colors;
const Mapping * getMapping () const return mapping;
const Vector3D& getNormal () const return plane -> n;
bool isFrontFacing ( const Vector3D& org ) const
if ( testFlag ( PF_TWOSIDED ) ) return true;
return plane != NULL ?
( plane -> classify ( org ) == IN_FRONT ) false;
}
const BoundingBox& getBoundingBox () const {
return boundingBox;
}

Основные классы для рендерера. Работа с ресурсами

Texture * getTexture () const {
return texture;
}
Lightmap * getLightmap () const {
return lightmap;
}
bool isEmpty () const {
return numVertices < 3;
}
void setMapping ( const Mappings ); void setTexture ( Texture * tex ); void setLightmap ( Lightmap * map ); void transform ( const Transform3D& );
// apply affine transform void transform ( const Matrix3D& );
// apply linear transform void translate ( const Vector3D& );
// translate polygon int classify ( const Plane& p ) const;
void split ( const Plane& p, Polygon3D& front,
Polygon3D& back ) const; void addVertex ( const Vector3D& v,
const Vector2D& uv,
const Vector4D& color ); void addVertex ( const Vector3D& v,
const Vector2D& uv ); void addVertex ( const Vector3D& v );
void delVertex ( int index );
bool contains ( const Vector3D& v ) const;
bool intersect ( const Polygon3D& ) const;
int clipByPlane ( const Plane& ); int clipByFrustrum ( const Frustrum& ); float intersectByRay ( const Vector3D& org,
const Vector3D& dir,
Vector3D& pos); float getSignedArea () const;

⇐ Предыдущая| |Следующая ⇒