- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
ARM.CPP
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:2k
源码类别:
游戏
开发平台:
Visual C++
- // (C) Copyright 1996 by Anthony J. Carin. All Rights Reserved.
- #include "stdafx.h"
- #include "arm.h"
- arm::arm(personal *p) : baseobject(p->upperarm())
- {
- coordinate tmp(0.0f,-0.4f*p->hight(),0.0f);
- elbow = new attachment(tmp);
- m_forearm = new forearm(p);
- elbow->attachto(m_forearm);
- }
- arm::~arm()
- {
- delete elbow;
- delete m_forearm;
- }
- void arm::setcolor(COLORREF c)
- {
- baseobject::setcolor(c);
- m_forearm->setcolor(c);
- }
- void arm::setskincolor(COLORREF c)
- {
- m_forearm->setskincolor(c);
- }
- void arm::draw()
- {
- baseobject::draw();
- elbow->draw();
- }
- void arm::setto(view& c)
- {
- baseobject::setto(c);
- elbow->setxoff(xposition);
- elbow->setyoff(yposition);
- elbow->setzoff(zposition);
- elbow->setto(c);
- }
- forearm::forearm(personal *p) : baseobject(p->lowerarm())
- {
- coordinate tmp(0.0f,-0.57f*p->hight(),0.0f);
- wrist = new attachment(tmp);
- m_hand = new hand(p);
- wrist->attachto(m_hand);
- }
- forearm::~forearm()
- {
- delete wrist;
- delete m_hand;
- }
- void forearm::setcolor(COLORREF c)
- {
- baseobject::setcolor(c);
- }
- void forearm::draw()
- {
- baseobject::draw();
- wrist->draw();
- }
- void forearm::setto(view& c)
- {
- baseobject::setto(c);
- wrist->setxoff(xposition);
- wrist->setyoff(yposition);
- wrist->setzoff(zposition);
- wrist->setto(c);
- }
- void forearm::setskincolor(COLORREF c)
- {
- m_hand->setskincolor(c);
- }
- hand::hand(personal *p) : baseobject(p->hand())
- {
- setcolor(RGB(240,200,0));
- }
- hand::~hand()
- {
- }
- totalarm::totalarm(coordinate& offset, personal *p)
- {
- armjoint = new attachment(offset);
- m_arm = new arm(p);
- armjoint->attachto(m_arm);
- }
- totalarm::~totalarm()
- {
- delete m_arm;
- delete armjoint;
- }