1 #ifndef GLDRAW_GEOMETRY_APPEARANCE_H 2 #define GLDRAW_GEOMETRY_APPEARANCE_H 5 #include <KrisLibrary/meshing/TriMesh.h> 7 #include "GLTextureObject.h" 8 #include "GLDisplayList.h" 9 #include <KrisLibrary/image/image.h> 15 class AnyCollisionGeometry3D;
56 enum Element { ALL, VERTICES, EDGES, FACES, SILHOUETTE, ALL_TRANSPARENT, ALL_OPAQUE };
72 void DrawGL(Element e=ALL);
75 void SetColor(
float r,
float g,
float b,
float a);
76 void SetColor(
const GLColor& color);
79 void ModulateColor(
const GLColor& color,
float fraction);
86 bool drawVertices,drawEdges,drawFaces;
87 float vertexSize,edgeSize;
95 std::shared_ptr<Image>
tex1D,tex2D;
112 std::shared_ptr<Meshing::TriMesh>
tempMesh,tempMesh2;
void drawWorld(const Geometry::AnyCollisionGeometry3D &geom)
draw the collision geometry in its world coordinates
Definition: GeometryAppearance.cpp:155
Definition: GLDisplayList.h:8
std::vector< GLColor > vertexColors
Optional: per-element colors.
Definition: GeometryAppearance.h:93
std::vector< Math3D::Vector2 > texcoords
Optional: per-element texture mapping coordinates (up to 2D)
Definition: GeometryAppearance.h:99
A class for coloring, texturing, and drawing meshes in OpenGL.
Definition: GeometryAppearance.h:53
std::vector< Math3D::Vector4 > texgen
Definition: GeometryAppearance.h:103
bool lightFaces
Use lighting or not (with lighting, will always do ambient and diffuse)
Definition: GeometryAppearance.h:89
GLDisplayList vertexDisplayList
Temporary: The display lists and texture lists for vertices, edges, faces, and silhouette.
Definition: GeometryAppearance.h:114
std::vector< GeometryAppearance > subAppearances
For group geometries.
Definition: GeometryAppearance.h:84
std::shared_ptr< Meshing::TriMesh > tempMesh
Temporary: Mesh computed for implicit surfaces, point clouds, silhouettes.
Definition: GeometryAppearance.h:112
Class declarations for useful 3D math types.
An AnyGeometry with collision detection information.
Definition: AnyGeometry.h:112
GLColor vertexColor
Global color.
Definition: GeometryAppearance.h:91
void drawFacesWorld(const Geometry::AnyCollisionGeometry3D &geom)
draw the collision geometry's faces in its world coordinates
Definition: GeometryAppearance.cpp:171
bool texWrap
If true, the texture will wrap. Default false.
Definition: GeometryAppearance.h:97
float silhouetteRadius
Optional: draw meshes with a silhouette outline (default 0)
Definition: GeometryAppearance.h:108
void drawExpanded(Geometry::AnyCollisionGeometry3D &geom, Real p)
draw the expansion of the collision geometry, in its local coordinates
Definition: GeometryAppearance.cpp:179
Contains all definitions in the GLDraw package.
Definition: AnyGeometry.h:14
A class that stores any kind of geometry we've defined.
Definition: AnyGeometry.h:37
void drawPointsWorld(const Geometry::AnyCollisionGeometry3D &geom)
draw the collision geometry's points in its world coordinates
Definition: GeometryAppearance.cpp:163
const Geometry::AnyGeometry3D * geom
Geometry pointer.
Definition: GeometryAppearance.h:82
An rgba color.
Definition: GLColor.h:9
float creaseAngle
Definition: GeometryAppearance.h:106
std::shared_ptr< Image > tex1D
Optional: set to non-null if you want to texture the object.
Definition: GeometryAppearance.h:95
Contains all definitions in the Geometry package.
Definition: AnyGeometry.cpp:26
A GL texture object class. Simplifies allocating and cleaning up texture objects. Usually you only ne...
Definition: GLTextureObject.h:13