TPC library url:
http://www.dannywartnaby.co.uk/rgt/attachments/DKShop.zip
Basic3D example url:
http://www.dannywartnaby.co.uk/rgt/attachments/LowLevVertExamples.zip
Camera3D exmaple url:
http://www.dannywartnaby.co.uk/rgt/attachments/Camera3DEnExample.zip
This freeware TPC library gives you access to low-level vertex manipulation and to some object and camera properties.
Command list.
Basic3D
This part of commands work directly with object internal data.
Return Integer=DK GET LIMB COUNT(Object Number)
Return Integer=DK GET OBJECT FVF(Object Number)
Return Integer=DK GET LIMB VERTEX COUNT(Object Number, Limb Number)
DK CALCULATE POLY NORMALS Object Number, Point1 X, Point1 Y, Point1 Z, Point2 X, Point2 Y, Point2 Z, Point3 X, Point3 Y, Point3 Z
Return Float=DK GET PICK VECTOR X()
Return Float=DK GET PICK VECTOR Y()
Return Float=DK GET PICK VECTOR Z()
Return Float=DK GET PICK DISTANCE()
Return Integer=DK GET OBJECT WIREFRAME(Object Number)
Return Integer=DK GET OBJECT CULL(Object Number)
Return Integer=DK GET OBJECT LIGHT(Object Number)
Return Integer=DK GET OBJECT AMBIENT(Object Number)
Return Integer=DK GET OBJECT FOG(Object Number)
Return DWORD=DK GET VERTEX DATA(Object Number, Limb Number, Vertex Number, IndexData)
Return Float=DK GET VERTEX POSITION X(Object Number, Limb Number, Vertex Number)
Return Float=DK GET VERTEX POSITION Y(Object Number, Limb Number, Vertex Number)
Return Float=DK GET VERTEX POSITION Z(Object Number, Limb Number, Vertex Number)
DK SET VERTEX DWORD DATA Object Number, Limb Number, Vertex Number, IndexData, Value
DK SET VERTEX FLOAT DATA Object Number, Limb Number, Vertex Number, IndexData, Value
DK SET VERTEX POSITION Object Number, Limb Number, Vertex Number, X, Y, Z
DK CONVERT LIMB MESH TO VERTS LIST Object Number, Limb Number
This part of commands work with vertex data buffer.
VB LOCK VERTEX DATA FOR LIMB Object Number, Limb Number
VB LOCK VERTEX DATA FOR MESH Mesh Number
VB UNLOCK VERTEX DATA
VB SET VERTEX DATA POSITION Vertex Number, X, Y, Z
VB SET VERTEX DATA NORMALS Vertex Number, X, Y, Z
VB SET VERTEX DATA DIFFUSE Vertex Number, Value
VB SET INDEX DATA Index, Value
VB SET VERTEX DATA UV Vertex Number, U, V
VB SET VERTEX DATA SIZE Vertex Number, Value
VB ADD MESH TO VERTEX DATA Mesh Number
VB DELETE MESH FROM VERTEX DATA ValueA, ValueB, ValueC, ValueD
Return Integer=VB GET VERTEX DATA VERTEX COUNT()
Return Integer=VB GET VERTEX DATA INDEX COUNT()
Return Float=VB GET VERTEX DATA POSITION X(Vertex Number)
Return Float=VB GET VERTEX DATA POSITION Y(Vertex Number)
Return Float=VB GET VERTEX DATA POSITION Z(Vertex Number)
Return Float=VB GET VERTEX DATA NORMALS X(Vertex Number)
Return Float=VB GET VERTEX DATA NORMALS Y(Vertex Number)
Return Float=VB GET VERTEX DATA NORMALS Z(Vertex Number)
Return Float=VB GET VERTEX DATA DIFFUSE(Vertex Number)
Return Float=VB GET VERTEX DATA U(Vertex Number)
Return Float=VB GET VERTEX DATA V(Vertex Number)
Camera3D
Return Float=DK GET CAMERA FOV(Camera Number)
Return Float=DK GET CAMERA NEAR(Camera Number)
Return Float=DK GET CAMERA FAR(Camera Number)
Return Integer=DK GET CAMERA VIEW X(Camera Number)
Return Integer=DK GET CAMERA VIEW Y(Camera Number)
Return Integer=DK GET CAMERA VIEW WIDTH(Camera Number)
Return Integer=DK GET CAMERA VIEW HEIGHT(Camera Number)
Return Float=DK GET CAMERA ASPECT(Camera Number)
DK CONVERT 3D TO 2D Camera Number, X, Y, Z
DK CONVERT 2D TO 3D Camera Number, X, Y, Distance
Planned commands in shareware version:
Basic3D
Return Float=ADVANCED INTERSECT OBJECT(Object Number, X, Y, Z, ToX, ToY, ToZ)
Return Integer=PICK OBJECT(Camera Number, Screen X, Screen Y, Object Start, Object End)
Return Integer=GET PICK POLY()
APPLY MATRIX4 TO LIMB Object Number, Limb Number, Matrix4
Matrix
Return Float=Intersect Matrix(MatrixNum, X, Y, Z, ToX, ToY, ToZ)
Return Integer=Pick Matrix(CameraNum, Screen X, Screen Y, Matrix Start, Matrix End)
Convert Matrix To Object MatrixNum, ObjectNum
3DSprite
Make Object 3DSprite ObjectNum, X, Y, Width, Height
Text In 3DSprite 3DSpriteNum, X, Y, Text$
Line In 3DSprite 3DSpriteNum, X1,Y1,X2,Y2
Dot In 3DSprite3D SpriteNum, X, Y
Paste Image In 3D3DSprite, SpriteNum, X, Y, ImageNum
Box In 3DSprite 3DSpriteNum, Left, Top, Right, Bottom
Point In 3DSprite 3DSpriteNum, X, Y
CLS In 3DSprite 3DSpriteNum
Resize 3DSprite 3DSpriteNum, X, Y, Width, Height
Return Integer=3DSprite Width(3DSpriteNum)
Return Integer=3DSprite Heigth(3DSpriteNum)
Return Integer=3DSprite Position X(3DSpriteNum)
Return Integer=3DSprite Position Y(3DSpriteNum)
Return Integer=3DSprite Depth(3DSpriteNum)
Return Integer=Pick 3DSprite(CameraNum, Screen X, Screen Y, 3DSprite Start, 3DSprite End)
P.S. Sorry for my English.
Specs: P4 2.4GHz, DIMM 256 266Mhz, 60GB HD 7200rpm ATA-133, GeForce 4 MX440, CD-RW+DVD, WinXP