Squeak Class Documentation category index | class index  
 
B3DVertexBuffer
  category: Balloon3D-Engine
  superclass: Object
  subclasses:

I represent the vertex buffer passed on throughout the entire Balloon 3D rendering pipeline. I store all information that may be needed by either part of the pipeline.

Instance variables:
current <B3DPrimitiveVertex> Tracking the current attributes of vertices
vertexArray <B3DPrimitiveVertexArray> Container for all primitive vertices
vertexCount <Integer> The number of vertices in the vertex array
indexArray <WordArray> Stores the indexes for indexed primitives
indexCount <Integer> Number of indexes in the index array
primitive <Integer> The type of primitive currently in the buffer
clipFlags <Integer> The clip mask of the vertices in the buffer
flags <Integer> Various state flags

instance methods
  accessing
  clipFlags
clipFlags:
flags
flags:
indexArray
indexArray:
indexCount
indexCount:
primitive
primitive:
vertexArray
vertexArray:
vertexCount
vertexCount:

  attributes
  clearFlags:
color
color:
loadIndexed:vertices:normals:colors:texCoords:
normal
normal:
texCoords
texCoords:
trackAmbientColor:
trackDiffuseColor:
trackEmissionColor:
trackSpecularColor:
vertex
vertex:

  initialize
  initialize
reset

  primitives
  primLoadIndexArrayInto:startingAt:from:count:max:offset:
primLoadVB:startingAt:vertices:normals:colors:texCoords:count:default:

  private
  errorSizeMismatch
growIndexArray:
growVertexArray:

  protected
  addClipIndex:
addClipVertex:
addPrimitiveIndex:
addPrimitiveVertex:
growForClip
primitiveColorAt:
primitiveIndexAt:
primitiveIndexAt:put:
primitiveVertexAt:
primitiveVertexAt:put:

  testing
  hasVertexNormals
hasVertexTexCoords
trackAmbientColor
trackDiffuseColor
trackEmissionColor
trackSpecularColor
twoSidedLighting
useLocalViewer

class methods
  instance creation
  new

instance methods
  accessing top  
 

clipFlags


 

clipFlags:


 

flags


 

flags:

Note: should be used with CARE!


 

indexArray


 

indexArray:


 

indexCount


 

indexCount:


 

primitive


 

primitive:


 

vertexArray


 

vertexArray:


 

vertexCount


 

vertexCount:


  attributes top  
 

clearFlags:


 

color


 

color:


 

loadIndexed:vertices:normals:colors:texCoords:

Check the size of the vertex array


 

normal


 

normal:


 

texCoords


 

texCoords:


 

trackAmbientColor:


 

trackDiffuseColor:


 

trackEmissionColor:


 

trackSpecularColor:


 

vertex


 

vertex:


  initialize top  
 

initialize


 

reset


  primitives top  
 

primLoadIndexArrayInto:startingAt:from:count:max:offset:

Primitive. Load the given index array into the receiver.
NOTE: dstStart is a zero-based index.


 

primLoadVB:startingAt:vertices:normals:colors:texCoords:count:default:


  private top  
 

errorSizeMismatch


 

growIndexArray:


 

growVertexArray:


  protected top  
 

addClipIndex:

Add a primitive index to the list of indexes.


 

addClipVertex:

Add a primitive vertex to the list of vertices processed.
Return the index of the vertex.


 

addPrimitiveIndex:

Add a primitive index to the list of indexes.


 

addPrimitiveVertex:

Add a primitive vertex to the list of vertices processed.
Return the index of the vertex.


 

growForClip


 

primitiveColorAt:


 

primitiveIndexAt:


 

primitiveIndexAt:put:


 

primitiveVertexAt:


 

primitiveVertexAt:put:


  testing top  
 

hasVertexNormals


 

hasVertexTexCoords


 

trackAmbientColor

Return true if the vertex colors override the ambient part of material entries.


 

trackDiffuseColor

Return true if the vertex colors override the diffuse part of material entries.


 

trackEmissionColor

Return true if the vertex colors override the emissive part of material entries.


 

trackSpecularColor

Return true if the vertex colors override the specular part of material entries.


 

twoSidedLighting

Return true if we shade front and back facing polygons differently


 

useLocalViewer


class methods
  instance creation top  
 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.