Ignore:
Timestamp:
Mar 23, 2012, 1:31:05 AM (13 years ago)
Author:
ldelgass
Message:

Some minor refactoring, also add some more fine grained config.h defines
(e.g. replace NV40 define with feature defines). Add tests for some required
OpenGL extensions (should always check for extensions or base version before
calling entry points from the extension). Also, clamp diffuse and specular
values on input and warn when they are out of range.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/ConvexPolygon.h

    r2822 r2877  
    2929{
    3030public:
    31     VertexVector vertices;
    32     TexVector texcoords;
    33     int volume_id;      //which volume this polygon slice belongs to
    34 
    3531    ConvexPolygon()
    3632    {}
     
    4339
    4440    // 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);
    4642
    47     void Emit(bool use_texture);
     43    void emit(bool useTexture);
    4844
    49     void Emit(bool use_texture, const Vector3& shift, const Vector3& scale);
     45    void emit(bool useTexture, const Vector3& shift, const Vector3& scale);
    5046
    51     void copy_vertices_to_texcoords();
     47    void copyVerticesToTexcoords();
    5248
    53     void set_id(int v_id)
     49    void setId(int id)
    5450    {
    55         volume_id = v_id;
     51        volumeId = id;
    5652    }
    5753
    58     void append_vertex(const Vector4& vert)
     54    void appendVertex(const Vector4& vert)
    5955    {
    6056        vertices.push_back(vert);
    6157    }
    6258
    63     void insert_vertex(unsigned int index, const Vector4& vert)
     59    void insertVertex(unsigned int index, const Vector4& vert)
    6460    {
    65         assert(index<vertices.size());
     61        assert(index < vertices.size());
    6662        vertices.insert(vertices.begin() + index, vert);
    6763    }
    6864
    69     bool is_retained(const Vector4& point, const Vector4& plane)
     65    bool isRetained(const Vector4& point, const Vector4& plane)
    7066    {
    7167        return ((point * plane) >= 0); 
    7268    }
     69
     70    VertexVector vertices;
     71    TexVector texcoords;
     72    int volumeId;       //which volume this polygon slice belongs to
    7373};
    7474
Note: See TracChangeset for help on using the changeset viewer.