File: Entity.h

package info (click to toggle)
darkradiant 3.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 41,080 kB
  • sloc: cpp: 264,743; ansic: 10,659; python: 1,852; xml: 1,650; sh: 92; makefile: 21
file content (55 lines) | stat: -rw-r--r-- 1,554 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once

#include "icommandsystem.h"
#include "inode.h"

#include <string>

namespace selection
{

namespace algorithm
{

/**
 * Applies the key/value combination to the currently selected entities.
 * It's safe to set a "classname" key through this method.
 * This doesn't open an UndoableCommand session, take care of this in the 
 * client code.
 *
 * Throws a cmd::ExecutionFailure in case the keyvalue cannot be applied.
 */
void setEntityKeyValue(const std::string& key, const std::string& value);

// Command adaptor wrapping the setEntityKeyvalue function above
void setEntityKeyValueOnSelection(const cmd::ArgumentList& args);

/**
 * greebo: "Binds" the selected entites together by setting the "bind"
 * spawnarg on both entities. Two entities must be highlighted for this
 * command to function correctly.
 */
void bindEntities();

/**
 * greebo: Sets up the target spawnarg of the selected entities such that
 * the first selected entity is targetting the second.
 */
void connectSelectedEntities();

/**
 * greebo: (De-)selects all entities that reference the given model path
 * in their "model" spawnarg.
 */
void selectItemsByModel(const std::string& model);
void deselectItemsByModel(const std::string& model);

// Command target to (de-)select items by model
void selectItemsByModelCmd(const cmd::ArgumentList& args);
void deselectItemsByModelCmd(const cmd::ArgumentList& args);

// Command target: PlacePlayerStart <origin>
void placePlayerStart(const cmd::ArgumentList& args);

} // namespace algorithm
} // namespace selection