Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 13, 2005, 11:39:44 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/physics: definition of the ground-class: field

File:
1 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/util/physics/field.h

    r4178 r4179  
    1 /*!
    2     \file proto_class.h
    3     \brief Definition of ...
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
    43
     4   Copyright (C) 2004 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific:
     12   main-programmer: Benjamin Grauer
     13   co-programmer: ...
    514*/
    615
    7 #ifndef _PROTO_CLASS_H
    8 #define _PROTO_CLASS_H
     16/*!
     17    \file field.h
     18    \brief abstract definition of a Physical Field
    919
    10 #include "base_object.h"
     20    This is a totally abstract class, that only enables different Physical Fields to
     21    exist on a common Level.
     22*/
     23
     24#ifndef _FIELD_H
     25#define _FIELD_H
     26
     27#include "p_node.h"
    1128
    1229// FORWARD DEFINITION
     
    1431
    1532
    16 //! A class for ...
    17 class ProtoClass : public BaseObject {
     33//! An abstract class that represents a Force.
     34class Field : public PNode
     35{
     36 public:
     37  Field();
     38  virtual ~Field();
    1839
    19  public:
    20   ProtoClass();
    21   virtual ~ProtoClass();
     40  /**
     41      \param data This is the data given to this force, to calculate the ForceVector
     42      \returns The Force Vector
     43  */
     44  virtual Vector& calcForce(Vector& data) = 0;
    2245
     46  void setMagnitude(const float& magnitude);
     47  /** \returns The Magnitude of the Field */
     48  const float& getMagnitude(void) const {return this->magnitude;}
     49
     50  void setAttenuation(const float& attenuation);
     51  /** \returns The Attenuation of the Fiels */
     52  const float& getAttenuation(void) const {return this->attenuation;}
    2353
    2454 private:
    25 
     55  float magnitude;                //!< The strength of the field
     56  float attenuation;              //!< The Attenuation (the bigger the shorter the influenced distance).
    2657};
    2758
    28 #endif /* _PROTO_CLASS_H */
     59#endif /* _FIELD_H */
Note: See TracChangeset for help on using the changeset viewer.