OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:Goose
(Results
1 - 3
of
3
) sorted by null
/external/chromium_org/native_client_sdk/src/examples/demo/flock/
goose.h
13
// A
Goose
. Each
goose
has a location and a velocity. Implements the
17
class
Goose
{
19
// Initialize a
Goose
at location (0, 0) no velocity.
20
Goose
();
22
// Initialize a
Goose
at the given location with the specified velocity.
23
Goose
(const Vector2& location, const Vector2& velocity);
26
// flocking algorithm (see
Goose
.flock()) and update the
goose
's location
33
void SimulationTick(const std::vector<
Goose
>& geese
[
all
...]
goose.cc
5
#include "
goose
.h"
8
// The maximum speed of a
goose
. Measured in meters/second.
11
// The maximum force that can be applied to turn a
goose
when computing the
15
// The neighbour radius of a
goose
. Only geese within this radius will affect
16
// the flocking computations of this
goose
. Measured in pixels.
19
// The minimum distance that a
goose
can be from this
goose
. If another
goose
20
// comes within this distance of this
goose
, the flocking algorithm tries to
24
// The distance at which attractors have effect on a
goose
's direction
90
const Goose&
goose
= *
goose
_it;
local
[
all
...]
flock.cc
21
#include "
goose
.h"
27
// The
goose
sprites rotate in increments of 5 degrees.
38
std::vector<
Goose
> g_geese;
49
g_geese[i] =
Goose
(center, Vector2(dx, dy));
68
// Run the simulation for each
goose
.
70
Goose
&
goose
= g_geese[i];
local
73
goose
.SimulationTick(g_geese, g_attractors, canvas_bounds);
74
pp::Point dest_point(
goose
.location().x() - sprite_side_length / 2,
75
goose
.location().y() - sprite_side_length / 2)
[
all
...]
Completed in 37 milliseconds