Revision c38d81dd include/ShapeNode.h
| b/include/ShapeNode.h | ||
|---|---|---|
| 108 | 108 |
* \param alpha Opacity channel. Number in the range [0, 1] |
| 109 | 109 |
*/ |
| 110 | 110 |
void setColor (float red, float green, float blue, float alpha); |
| 111 |
void setTextureFromFile (const char* filename); |
|
| 112 | 111 |
void setRenderBin (int i); |
| 113 | 112 |
void setLighting (int i); |
| 114 | 113 |
|
| 115 |
void setStateSetFromFile(const char* filename); |
|
| 116 |
void setStateSet (const char* s); |
|
| 117 |
const char *getStateSet () const { return stateset->s_name; }
|
|
| 118 |
void updateStateSet (); |
|
| 114 |
virtual void updateStateSet(); |
|
| 119 | 115 |
|
| 120 | 116 |
int getShape() const { return (int)shape; }
|
| 121 | 117 |
int getBillboard() const { return (int)billboard; }
|
| ... | ... | |
| 123 | 119 |
int getRenderBin() const { return renderBin; }
|
| 124 | 120 |
int getLighting() const { return (int)lightingEnabled; }
|
| 125 | 121 |
|
| 126 |
//void addSharedVideoTexture(osg::Node *n, std::string shID); |
|
| 127 |
//void addVideoTexture(osg::Node *n, std::string texturePath); |
|
| 128 |
void addImageTexture(osg::Node *n, std::string texturePath); |
|
| 129 | 122 |
|
| 130 | 123 |
/** |
| 131 | 124 |
* For each subclass of ReferencedNode, we override the getState() method to |
| ... | ... | |
| 135 | 128 |
|
| 136 | 129 |
shapeType shape; |
| 137 | 130 |
|
| 138 |
t_symbol *stateset; |
|
| 139 | 131 |
|
| 140 | 132 |
billboardType billboard; |
| 141 | 133 |
|
| ... | ... | |
| 145 | 137 |
std::string texturePath; |
| 146 | 138 |
|
| 147 | 139 |
int renderBin; |
| 148 |
|
|
| 149 | 140 |
bool lightingEnabled; |
| 150 | 141 |
|
| 151 | 142 |
//osg::ref_ptr<osg::Image> textureImage; // store textureImage so we don't waste time in the callback |
| ... | ... | |
| 156 | 147 |
|
| 157 | 148 |
protected: |
| 158 | 149 |
virtual void drawShape(); |
| 159 |
virtual void drawTexture(); |
|
| 160 | 150 |
|
| 161 | 151 |
}; |
| 162 | 152 |
|
Also available in: Unified diff