|
An object used to create a mesh.
It would include the basic properties of all objects and also the Scale and Offset properties in other mesh objects.
It would have four extra functions with it:
SetFace(V1,V2,V3,Name,LookVector)
-Creates a mesh face.
-If V1-3 are (0,0,0) then it removes the face with the given name.
[V1,(Vector3,Face)] Vector3 of the first point of a mesh face, or could be a Face which makes the rest of the arguments uneeded.
[V2,(Vector3,String)] Second point, if V1 is a Face then this is the Name of the face.
[V3,(Vector3)] Third point.
[Name,(String)] Used for selecting the face this function creates.
[LookVector,Vector3] Makes one side of the face look solid, and the other empty, if LookVector is (0,0,0) or is parallel to the face, both sides will be solid, if LookVector is nil, then it becomes a Vector3 of (0,0,0).
GetFaces()
-Returns a table of the names of the various faces in the mesh.
GetFace(Name)
-Returns the Face with the given name.
-If there is no face with the name it will return nil.
[Name,(String)] The name of the desired face.
RemoveFace(Name)
-Removes a face with the name of the given Name string.
[Name,(String)] The name of the desired face.
Face
-table, global like Vector3 and math are.
Face.new(V1,V2,V3,LookVector)
-Returns a Face userdata value.
[V1,(Vector3)] Vector3 of the first point.
[V2,(Vector3)] Second point.
[V3,(Vector3)] Thrid point.
[LookVector,(Vector3)] Makes one side of the face look solid, and the other empty, if LookVector is (0,0,0) or is parallel to the face, both sides will be solid, if LookVector is nil, then it becomes a Vector3 of (0,0,0).
Face (What is returned with the Face.new function)
-userdata, values correspond with arguments of the Face.new function
Face.Vec1
Face.Vec2
Face.Vec3
Face.LookVector
I'm sure I have made some errors in typing this. Most that read this will probably be confused so please leave questions and I will try to answer. |