Ralph,

Here's my take on things - anyone else, correct me if I'm wrong :-

Segment - A class used to construct a single line/curve between two 3d
vertices using a given segment based material. Segments need to be
added to a Mesh for rendering.

Face - A class used to construct a three 3d vertex face using the
given triangle based material and specified UV coordinates. Faces also
supports >3 vertices for irregular shapes such as textfield3ds
however, these do not support UV texturing. Faces need to be added to
a Mesh object before it can be rendered.

Triangle - A primitive object (which can be directly used within a
scene) to draw a triangle shape based on 3 vertices (a, b & c). Behind
the scenes, this creates a mesh object and adds a Face to it. The
constructor can take an 'edge' length property to build an equilateral
triangle.

Element - This class is a low level class which defines
characteristics of basic 3d elements such as the Face, Segment &
Billboard classes. As such, it shouldn't be used directly in the
creation of object, the API manages this for you.

Geometry - This class again more of an internal class which manages
the geometrical features of a Mesh object including vertex lists, face
lists, segment lists, billboard lists, animation characteristics,
vector graphic details, etc  Again, not really to be used directly.

Mesh - This the main class for building and rendering a 3d object. It
allows you to add 3d elements (faces, segments or billboards) to the
mesh, specify materials, provide interactivity, access to the shape's
geometry (it uses the Geometry class) info that gets constructed from
the elements, animation control. This is the class to extend to make
your own object (or you could also use the AbstractPrimitive class for
further features).

Primitive - A primitive in Away3D is a pre-defined parameterised 3d
building blocks that can be directly added to a scene without having
to add any 3d elements yourself. Sphere, Cube, Cylinder, Plane,
LineSegment, Triangle, BezierPatch, Torus, etc Just specify the
dimensions necessary as properties, give it a material, add it to the
scene and that's all that's required.

Object3D - This is the base class for 3d objects. Included in this are
detail about the object's scene position, rotation, scaling,
parentage, render session, bounding box, filters, etc. The Mesh class
extends this to add 3d elements for rendering, whilst the
ObjectContainer3D extends this to enable hierarchys of objects and
containers.

Vertex - This defines a 3d point in space which will be used in the
scene. It has methods/properties to take advantage of the internal
caching system of Away3d, allow 3d transformations, cloning,
perspective distortion, distance between 2 points, etc. It has a
position propert which is defined by a Number3D object.

Number3D - The basic type of a 3d coordinate using x,y & z. Basically
a 3d version of the Number class, it has mathematical methods such as
add, sub, distance, dot, cross, angle, normalize, rotate, transform,
scale, etc. So for 3d maths, this is your class.

Billboard - From the docs, it's a graphics element used to represent
objects that always face the camera. Just like with Face and Segment,
you wouldn't necessarily use this class yourself unless you were
trying to construct your own custom Mesh. However these are used in
the context of a Mesh unlike the sprite classes which are added to the
scene directly and individually. I've not used these so I've not
really seen how they function.

In short, either build an object from a series of primitive objects
and put them in a container, construct a new primitive class in the
same way as other primitives by extending the AbstractPrimitive class
and using it's helper functions or finally, extend the Mesh class and
add your elements to it.

Hope that clears a few things up rather than confuse matters.

Greg

On Oct 29, 3:53 pm, Ralph B <[email protected]> wrote:
> Could someone help me better understand the definitions of, and
> relationships between, the following terms in the context of Away3D?
>
> Segment
> Face
> Triangle
> Element
> Geometry
> Mesh
> Primitive
> Object3D
> Vertex
> Number3D
> Billboard
>
> I am puzzling over how to correctly build new objects and it is a bit
> confusing how the Away3D engine wants these classes to be used...
>
> Thanks! Ralph

Reply via email to