FreeMat

- Main Page
- Related Pages

GLNODE Create a GL Node

Section: OpenGL Models

# Usage

Define a GL Node. A GL Node is an object that can be displayed in a GL Window. It is defined by a triangular mesh of vertices. It must also have a material that defines its appearance (i.e. color, shininess, etc.). The syntax for the `glnode` command is

      glnode(name,material,pointset)

where `material` is the name of a material that has already been defined with `gldefmaterial`, `pointset` is a `3 x N` matrix of points that define the geometry of the object. Note that the points are assumed to be connected in triangular facts, with the points defined counter clock-wise as seen from the outside of the facet. `FreeMat` will compute the normals. The `name` argument must be unique. If you want multiple instances of a given `glnode` in your GLWindow, that is fine, as instances of a `glnode` are created through a `glassembly`.