Class: Fox::FXGLShape

Inherits:
FXGLObject show all
Defined in:
rdoc-sources/FXGLShape.rb

Overview

OpenGL shape object.

Shape drawing options

SURFACE_SINGLESIDED

Single-sided [both sides same]

SURFACE_DUALSIDED

Dual-sided surface

SHADING_NONE

No light source

SHADING_SMOOTH

Smooth shaded

SHADING_FLAT

Flag shaded

FACECULLING_OFF

No face culling

FACECULLING_ON

Cull backward facing surfaces

STYLE_SURFACE

Draw filled surfaces

STYLE_WIREFRAME

Draw wire frame

STYLE_POINTS

Draw as points

STYLE_BOUNDBOX

Draw bounding box

Message identifiers

ID_SHADEOFF

x

ID_SHADEON

x

ID_SHADESMOOTH

x

ID_TOGGLE_SIDED

x

ID_TOGGLE_CULLING

x

ID_STYLE_POINTS

x

ID_STYLE_WIREFRAME

x

ID_STYLE_SURFACE

x

ID_STYLE_BOUNDINGBOX

x

ID_FRONT_MATERIAL

x

ID_BACK_MATERIAL

x

Direct Known Subclasses

FXGLCone, FXGLCube, FXGLCylinder, FXGLSphere

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#positionObject

Position Fox::FXVec3f


39
40
41
# File 'rdoc-sources/FXGLShape.rb', line 39

def position
  @position
end

#tipTextObject

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