?? object.h
字號:
/* * Copyright 2002-2005, Mersad Team, Allameh Helli High School (NODET). * * This program is free software, you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * This file is created by: Ahmad Boorghany * * Released on Monday 1 August 2005, 10 Mordad 1384 by Mersad RoboCup Team. * For more information please read README file.*/#ifndef __OBJECT_H#define __OBJECT_H#include <Vector.h>#include <FieldData.h>#ifndef NULL# define NULL 0#endif // NULL#define MAX_POS_DEV 20#define MAX_VEL_DEV 5class ConfigGroup;class SExpression;typedef ConfigGroup Param;class Object{protected: bool readyToUpdateFlag; float posDeviation; float validPosDeviation; float velDeviation; float seeDistance; float seeDirection; float seeDistChange; float seeDirChange; unsigned seeTime; unsigned velSeeTime; Vector position; Vector velocity; Vector absVector; Vector bodyVector; Vector headVector; // Local serverparams for Updates and Simulates float accelMax; float decay; float rand; float size; float speedMax; float maxMoment; float minMoment; float maxPower; float minPower; float quantizeStep; float quantizeStepL;public: Object(); virtual ~Object(); void setServerParamVars(const Param &serverParam); void parse(const SExpression &exp, unsigned curTime); float getDistance(const Object &obj) const; float getDistance(const Point &point) const; void kill(); bool isValid() const; // Getting functions bool isReadyToUpdate() const; float getPosDeviation() const; float getValidPosDeviation() const; float getVelDeviation() const; float getSeeDistance() const; float getSeeDirection() const; float getSeeDistChange() const; float getSeeDirChange() const; unsigned getSeeTime() const; unsigned getVelSeeTime() const; float getAccelMax() const; float getDecay() const; float getRand() const; float getSize() const; float getSpeedMax() const; float getMaxMoment() const; float getMinMoment() const; float getMaxPower() const; float getMinPower() const; float getQuantizeStep() const; float getQuantizeStepL() const; const Vector &getPos() const; const Vector &getVel() const; const Vector &getAbsVec() const; const Vector &getBodyVec() const; const Vector &getHeadVec() const; // Setting functions void setReadyToUpdate(bool readyToUpdateFlagArg); void setPosDeviation(float posDeviationArg); void setValidPosDeviation(float posDeviationArg); void setVelDeviation(float velDeviationArg); void setSeeDistance(float seeDistanceArg); void setSeeDirection(float seeDirectionArg); void setSeeDistChange(float seeDistChangeArg); void setSeeDirChange(float seeDirChangeArg); void setSeeTime(unsigned seeTimeArg); void setVelSeeTime(unsigned velSeeTimeArg); void setDecay(float decayArg); Vector &setPos(); Vector &setVel(); Vector &setAbsVec(); Vector &setBodyVec(); Vector &setHeadVec();};class FieldFlag: public Object{protected: int id;public: void update(const FieldData &fieldData); void parse(int idArg, const SExpression &exp, unsigned curTime); int getId() const;};class FieldLine: public Object{protected: int id; float prependOrient;public: void update(const FieldData &fieldData); void parse(int idArg, const SExpression &exp, unsigned curTime); int getId() const; float getPrependOrient() const;};class FieldGoal: public Object{protected: int id;public: void update(const FieldData &fieldData); void parse(int idArg, const SExpression &exp, unsigned curTime); void parseFullState(int idArg, const SExpression &exp, unsigned curTime); int getId() const;};#endif // __OBJECT_H
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -