Class: Fox::FXGLShape
- Inherits:
-
FXGLObject
- Object
- FXObject
- FXGLObject
- Fox::FXGLShape
- Defined in:
- rdoc-sources/FXGLShape.rb
Overview
OpenGL shape object.
Shape drawing options
SURFACE_SINGLESIDEDSingle-sided [both sides same]
SURFACE_DUALSIDEDDual-sided surface
SHADING_NONENo light source
SHADING_SMOOTHSmooth shaded
SHADING_FLATFlag shaded
FACECULLING_OFFNo face culling
FACECULLING_ONCull backward facing surfaces
STYLE_SURFACEDraw filled surfaces
STYLE_WIREFRAMEDraw wire frame
STYLE_POINTSDraw as points
STYLE_BOUNDBOXDraw bounding box
Message identifiers
ID_SHADEOFFx
ID_SHADEONx
ID_SHADESMOOTHx
ID_TOGGLE_SIDEDx
ID_TOGGLE_CULLINGx
ID_STYLE_POINTSx
ID_STYLE_WIREFRAMEx
ID_STYLE_SURFACEx
ID_STYLE_BOUNDINGBOXx
ID_FRONT_MATERIALx
ID_BACK_MATERIALx
Direct Known Subclasses
Instance Attribute Summary collapse
-
#position ⇒ Object
Position FXVec3f.
-
#tipText ⇒ Object
Tool tip message for this shape [String].
Instance Method Summary collapse
-
#drawshape(viewer) ⇒ Object
Draws the shape in this GL viewer.
-
#getMaterial(side) ⇒ Object
Get the material for specified side (where side = 0 or 1).
-
#initialize(x, y, z, opts, front = nil, back = nil) ⇒ FXGLShape
constructor
Construct with specified origin, options and front and back materials.
-
#setMaterial(side, mtl) ⇒ Object
Set the material for specified side, where side = 0 or 1 and mtl is an FXMaterial instance.
-
#setRange(box) ⇒ Object
Set the range (an FXRangef instance) for this shape.
Methods inherited from FXGLObject
#bounds, #canDelete, #canDrag, #copy, #drag, #draw, #hit, #identify
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(x, y, z, opts, front = nil, back = nil) ⇒ FXGLShape
Construct with specified origin, options and front and back materials.
49 50 |
# File 'rdoc-sources/FXGLShape.rb', line 49 def initialize(x, y, z, opts, front=nil, back=nil) # :yields: theGLShape end |
Instance Attribute Details
#position ⇒ Object
Position Fox::FXVec3f
39 40 41 |
# File 'rdoc-sources/FXGLShape.rb', line 39 def position @position end |
#tipText ⇒ Object
Tool tip message for this shape [String]
36 37 38 |
# File 'rdoc-sources/FXGLShape.rb', line 36 def tipText @tipText end |
Instance Method Details
#drawshape(viewer) ⇒ Object
Draws the shape in this GL viewer.
44 |
# File 'rdoc-sources/FXGLShape.rb', line 44 def drawshape(viewer); end |
#getMaterial(side) ⇒ Object
Get the material for specified side (where side = 0 or 1).
61 |
# File 'rdoc-sources/FXGLShape.rb', line 61 def getMaterial(side); end |
#setMaterial(side, mtl) ⇒ Object
Set the material for specified side, where side = 0 or 1 and mtl is an FXMaterial instance.
56 |
# File 'rdoc-sources/FXGLShape.rb', line 56 def setMaterial(side, mtl); end |
#setRange(box) ⇒ Object
Set the range (an FXRangef instance) for this shape.
66 |
# File 'rdoc-sources/FXGLShape.rb', line 66 def setRange(box); end |