CVH

From FreeAllegiance Wiki
Jump to navigationJump to search
Edit.png
Stub This article is incomplete

This is an article about a topic that should be covered in more detail by the FreeAllegiance Wiki, but is lacking in content.

You can help by improving it!

ConVex Hull file

Purpose

CVH files are used by the engine to perform collision detection.

a CVH is usually generated from 3D model file using QHull

AMT can also generate CVH files, but it may calculate the radius incorrectly.

Format

CVH files are standard text files.

The format is:


[radius] [ellipse equation x] [ellipse equation y] [ellipse equation z] [ellipse Radius Multiplier]

[n = number of hulls]

[hull_1
[p= number of vertices] [number of adjacents]  [x] [y] [z] (center of the hull)
 [vertex_1
   [x] [y] [z] [A = number of Adjacencies] (coords of the vertex) 
     [a1] .. [aA] (indexes of adjacent vertices, 1 = vertex_1, etc)
 ]
  ...
 [vertex_p]
]

[hull_2]

...

[hull_n]

[frame_1 
 [name] 
  x,y,z position vector 
  x,y,z direction vector
]
[frame_2]
...