mirror of https://github.com/ClassiCube/ClassiCube
Almost finished spider model, just need to implement all 8 rotated legs.
This commit is contained in:
parent
71e3ae89c9
commit
8610ff92aa
|
|
@ -15,8 +15,8 @@ namespace ClassicalSharp.Model {
|
|||
Set.Head = MakeHead();
|
||||
Set.Link = MakeLink();
|
||||
Set.End = MakeEnd();
|
||||
//Set.LeftLegFront = MakeLeg( -0.1875f, 0f, -0.125f, -0.0625f );
|
||||
//Set.RightLegFront = MakeLeg( 0f, 0.1875f, 0.0625f, 0.125f );
|
||||
Set.LeftLeg = MakeLeg( -1.1875f, -0.1875f );
|
||||
Set.RightLeg = MakeLeg( 0.1875f, 1.1875f );
|
||||
vertices = null;
|
||||
|
||||
DefaultSkinTextureId = graphics.LoadTexture( "spider.png" );
|
||||
|
|
@ -31,16 +31,11 @@ namespace ClassicalSharp.Model {
|
|||
}
|
||||
|
||||
ModelPart MakeEnd() {
|
||||
index = 0;
|
||||
const float x1 = -0.3125f, x2 = 0.3125f, y1 = 0.25f, y2 = 0.75f, z1 = 0.1875f, z2 = 0.9375f;
|
||||
|
||||
YPlane( 12, 12, 10, 12, x2, x1, z2, z1, y2, false ); // top
|
||||
YPlane( 22, 12, 10, 12, x2, x1, z1, z2, y1, false ); // bottom
|
||||
ZPlane( 12, 24, 10, 8, x2, x1, y1, y2, z1, false ); // front
|
||||
ZPlane( 22, 24, 10, 8, x2, x1, y2, y1, z2, false ); // back
|
||||
XPlane( 0, 24, 12, 8, z2, z1, y1, y2, x1, false ); // left
|
||||
XPlane( 32, 24, 12, 8, z2, z1, y2, y1, x2, false ); // right
|
||||
return new ModelPart( vertices, 6 * 6, graphics );
|
||||
return MakePart( 0, 12, 12, 8, 10, 12, 10, 8, -0.3125f, 0.3125f, 0.25f, 0.75f, 0.1875f, 0.9375f, false );
|
||||
}
|
||||
|
||||
ModelPart MakeLeg( float x1, float x2 ) {
|
||||
return MakePart( 18, 0, 2, 2, 16, 2, 16, 2, x1, x2, 0.4375f, 0.5625f, -0.0625f, 0.0625f, false );
|
||||
}
|
||||
|
||||
public override float NameYOffset {
|
||||
|
|
@ -53,11 +48,11 @@ namespace ClassicalSharp.Model {
|
|||
graphics.Bind2DTexture( texId );
|
||||
graphics.AlphaTest = true;
|
||||
|
||||
DrawRotateX( 0, 0.5625f, -0.1875f, -pitch, Set.Head );
|
||||
DrawRotateX( 0, 0.5f, -0.1875f, -pitch, Set.Head );
|
||||
Set.Link.Render();
|
||||
Set.End.Render();
|
||||
//DrawRotateX( 0, 0.3125f, 0.0625f, leftLegXRot, Set.LeftLegFront );
|
||||
//DrawRotateX( 0, 0.3125f, 0.0625f, rightLegXRot, Set.RightLegFront );
|
||||
DrawRotateZ( -0.1875f, 0.5f, 0, 22.5f, Set.LeftLeg );
|
||||
DrawRotateZ( 0.1875f, 0.5f, 0, -22.5f, Set.RightLeg ); // TODO: 8 rotated legs
|
||||
}
|
||||
|
||||
public override void Dispose() {
|
||||
|
|
@ -67,11 +62,11 @@ namespace ClassicalSharp.Model {
|
|||
|
||||
class ModelSet {
|
||||
|
||||
public ModelPart Head, Link, End, LegLeft, LegRight;
|
||||
public ModelPart Head, Link, End, LeftLeg, RightLeg;
|
||||
|
||||
public void Dispose() {
|
||||
//RightLegFront.Dispose();
|
||||
//LeftLegFront.Dispose();
|
||||
RightLeg.Dispose();
|
||||
LeftLeg.Dispose();
|
||||
End.Dispose();
|
||||
Head.Dispose();
|
||||
Link.Dispose();
|
||||
|
|
|
|||
Loading…
Reference in New Issue