Properties

CC3LineNode Class Reference

CC3LineNode is a type of CC3MeshNode that is specialized to display lines. More...

#import <CC3MeshNode.h>

Inheritance diagram for CC3LineNode:
Inheritance graph
[legend]
Collaboration diagram for CC3LineNode:
Collaboration graph
[legend]

List of all members.

Properties

GLfloat lineWidth
GLenum performanceHint
BOOL shouldSmoothLines

Detailed Description

CC3LineNode is a type of CC3MeshNode that is specialized to display lines.

It includes properties for setting the line width, and whether or not the lines should be smoothed using automatic anti-aliasing.

To draw lines, you must make sure that the drawingMode property of the vertex array that performs the drawing within the mesh (either the vertexIndices or vertexLocations instance) is set to one of GL_LINES, GL_LINE_STRIP or GL_LINE_LOOP. Other than that, you configure the mesh node and its mesh as you would with any mesh node.

For a simple wire box, you can use the populateAsWireBox:withPureColor: convenience method of CC3MeshNode.

To color the lines, use the pureColor property to draw the lines in a pure, solid color that is not affected by lighting conditions. You can also add a material to your CC3LineNode instance to get more subtle coloring and blending, but this can sometimes appear strange with lines. You can also use CCActionInterval to change the tinting or opacity of the lines, as you would with any mesh node.

Several convenience methods exist in the CC3MeshNode class to aid in constructing a CC3LineNode instance:


Property Documentation

- (GLfloat) lineWidth [read, write, assign]

The width of the lines that will be drawn.

The initial value is 1.0.

- (GLenum) performanceHint [read, write, assign]

Indicates how the GL engine should trade off between rendering quality and speed.

The value of this property should be one of GL_FASTEST, GL_NICEST, or GL_DONT_CARE.

The initial value of this property is GL_DONT_CARE.

- (BOOL) shouldSmoothLines [read, write, assign]

Indicates whether lines should be smoothed (antialiased).

The initial value is NO.


The documentation for this class was generated from the following file: