Changeset 2877 for trunk/packages/vizservers/nanovis/ConvexPolygon.h
- Timestamp:
- Mar 23, 2012, 1:31:05 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/ConvexPolygon.h
r2822 r2877 29 29 { 30 30 public: 31 VertexVector vertices;32 TexVector texcoords;33 int volume_id; //which volume this polygon slice belongs to34 35 31 ConvexPolygon() 36 32 {} … … 43 39 44 40 // Clips the polygon, retaining the portion where ax + by + cz + d >= 0 45 void clip(Plane& clipPlane, bool copy _to_texcoords);41 void clip(Plane& clipPlane, bool copyToTexcoords); 46 42 47 void Emit(bool use_texture);43 void emit(bool useTexture); 48 44 49 void Emit(bool use_texture, const Vector3& shift, const Vector3& scale);45 void emit(bool useTexture, const Vector3& shift, const Vector3& scale); 50 46 51 void copy _vertices_to_texcoords();47 void copyVerticesToTexcoords(); 52 48 53 void set _id(int v_id)49 void setId(int id) 54 50 { 55 volume _id = v_id;51 volumeId = id; 56 52 } 57 53 58 void append _vertex(const Vector4& vert)54 void appendVertex(const Vector4& vert) 59 55 { 60 56 vertices.push_back(vert); 61 57 } 62 58 63 void insert _vertex(unsigned int index, const Vector4& vert)59 void insertVertex(unsigned int index, const Vector4& vert) 64 60 { 65 assert(index <vertices.size());61 assert(index < vertices.size()); 66 62 vertices.insert(vertices.begin() + index, vert); 67 63 } 68 64 69 bool is _retained(const Vector4& point, const Vector4& plane)65 bool isRetained(const Vector4& point, const Vector4& plane) 70 66 { 71 67 return ((point * plane) >= 0); 72 68 } 69 70 VertexVector vertices; 71 TexVector texcoords; 72 int volumeId; //which volume this polygon slice belongs to 73 73 }; 74 74
Note: See TracChangeset
for help on using the changeset viewer.